package com.summer.serialization;

import java.io.IOException;
import java.io.Serializable;

public class AdapterBean implements Serializable {

	/***/
	private static final long serialVersionUID = 1L;
	private String name;
	private int age;

	public AdapterBean(String name, int age) {
		this.name = name;
		this.age = age;
	}

	private void writeObject(java.io.ObjectOutputStream out) throws IOException{
		out.defaultWriteObject();
		System.out.println("AdapterBean writeObject.");
	}

	private void readObject(java.io.ObjectInputStream in) throws Exception {
		in.defaultReadObject();
		System.out.println("AdapterBean readObject.");
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "{name:" + name + ", age: " + age + "}";
	}
}